﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Castle.MicroKernel.Registration;
using Raven.Client;
using Raven.Client.Document;
using Castle.MicroKernel.SubSystems.Configuration;
using System.Configuration;
using Castle.Windsor;

namespace Genrsis.WorkitemTracking.Web.Infrastructure.IoC
{
    public class RavenInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            IDocumentStore documentStore = new DocumentStore { ConnectionStringName = "RavenDB" };
            documentStore.Conventions.IdentityPartsSeparator = "-";
            documentStore.Initialize();

            container.Register(
                Component.For<IDocumentStore>().Instance(documentStore)
                );
        }
    }
}